<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script language="javascript" type="text/javascript">
    function printpage(myDiv){    
    //var newstr = document.all.item(myDiv).innerHTML; 
    var newstr = document.getElementById(myDiv).innerHTML;
    var oldstr = document.body.innerHTML; 
    document.body.innerHTML = newstr; 
    window.print(); 
    document.body.innerHTML = oldstr; 
    return false; 
    } 
    </script>
   <div id="myDiv">Content</div>
<input type="button" id="bt" onclick="javascript:printpage('myDiv')"   value="打印" />
	</body>
</html>
